<?php
namespace Admin\Model;
use Think\Model\RelationModel;
class OrderRecordModel extends RelationModel
{
    protected $_link = array(

        //订单表
        'order'=>array(
            'mapping_type' => self::BELONGS_TO,
            'class_name' => 'Order',
            'foreign_key'   => 'order_id',
            'as_fields' => 'status,is_pay,is_deliver,code_num',
        ),

        //管理员表
        'manager'=>array(
            'mapping_type' => self::BELONGS_TO,
            'class_name' => 'Manager',
            'foreign_key'   => 'uid',
            'as_fields' => 'name',

        ),


    );
}

